//
//  ScreenCell.m
//  XDBaseFrameWork
//
//  Created by XD-XY on 10/21/14.
//  Copyright (c) 2014 XD-XY. All rights reserved.
//

#import "ScreenCell.h"

@implementation ScreenCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        [self makeViews];
    }
    return self;
}

-(void)makeViews
{
    self.myBtn = [UIButton initButton:CGRectMake(0,0,75,30) btnNorImage:LOADIMAGE(@"whrite_co@2x") btnDisableBtn:LOADIMAGE(@"gray_con_@2x") btnTitle:@"" titleNorColor:UIColorFromRGB(0x9e9e9e) titleSelectColor:UIColorFromRGB(0xffffff) titleFont:[UIFont systemFontOfSize:13]];
    
    [self addSubview:_myBtn];
}

-(void)setSwdataDict:(NSMutableDictionary *)swdataDict
{
    if (_swdataDict){
        _swdataDict = nil;
    }
    _swdataDict = [[NSMutableDictionary alloc] initWithDictionary:swdataDict];
    if (IS_NOT_EMPTY(_swdataDict[@"SceneName"])){
        [_myBtn setTitle:_swdataDict[@"SceneName"] forState:UIControlStateNormal];    
    }else{
    
    }
}

-(void)setSwdataDict:(NSMutableDictionary *)swdataDict withKey:(NSString *)key
{
    if (_swdataDict){
        _swdataDict = nil;
    }
    _swdataDict = [[NSMutableDictionary alloc] initWithDictionary:swdataDict];
    if (IS_NOT_EMPTY(_swdataDict[key])){
        [_myBtn setTitle:_swdataDict[key] forState:UIControlStateNormal];
    }else{
        
    }
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
